package com.learn.codesourcelearn.bean;

import com.learn.codesourcelearn.bean.service.UserService;
import com.learn.codesourcelearn.bean.service.impl.UserServiceImpl1;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * @author yekaile
 * @Date 2020/11/12 19:56
 */
@Component
public class LearnFactoryBean implements FactoryBean {
    @Override
    public Object getObject() throws Exception {
        return new UserServiceImpl1();
    }

    @Override
    public Class<?> getObjectType() {
        return UserService.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }

}
